bitkeeper revision 1.1567 (4295fc0dckrpqmqbCHpAHRHUcTGMTQ)
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Thu, 26 May 2005 16:40:45 +0000 (16:40 +0000)
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Thu, 26 May 2005 16:40:45 +0000 (16:40 +0000)
Nicer pretty printing.
Signed-off-by: Keir Fraser <keir@xensource.com>
linux-2.6.11-xen-sparse/arch/xen/kernel/fixup.c

index 6e81f6ada65cb0ea92f50c7a2cf41afc46c7532c..64a98e62a76012b7a0e2666ef377a117b48252e0 100644 (file)
@@ -35,8 +35,7 @@
 #include <linux/delay.h>
 #include <linux/version.h>
 
-#define DA(_f, args...) printk(KERN_ALERT "  " _f "\n", args)
-#define DP(_f) printk(KERN_ALERT "  " _f "\n")
+#define DP(_f, _args...) printk(KERN_ALERT "  " _f "\n" , ## _args )
 
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
 #define __LINKAGE fastcall
@@ -47,6 +46,7 @@
 __LINKAGE void do_fixup_4gb_segment(struct pt_regs *regs, long error_code)
 {
     static unsigned long printed = 0;
+    char info[100];
     int i;
 
     if ( !test_and_set_bit(0, &printed) )
@@ -54,15 +54,17 @@ __LINKAGE void do_fixup_4gb_segment(struct pt_regs *regs, long error_code)
         HYPERVISOR_vm_assist(VMASST_CMD_disable,
                             VMASST_TYPE_4gb_segments_notify);
 
+        sprintf(info, "%s (pid=%d)", current->comm, current->tgid);
+
         DP("");
         DP("***************************************************************");
         DP("***************************************************************");
-        DA("** process using TLS: %16s (pid: %5d)          **", current->comm, current->tgid);
         DP("** WARNING: Currently emulating unsupported memory accesses  **");
         DP("**          in /lib/tls libraries. The emulation is very     **");
         DP("**          slow. To ensure full performance you should      **");
         DP("**          execute the following as root:                   **");
         DP("**          mv /lib/tls /lib/tls.disabled                    **");
+        DP("** Offending process: %-38.38s **", info);
         DP("***************************************************************");
         DP("***************************************************************");
         DP("");